@extends('admin.layouts.app')
@section('content')
<div class="row">
    <div class="col-lg-12">
        <section class="panel">
            <header class="panel-heading custom-tab dark-tab">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#home2" data-toggle="tab">基本信息</a>
                    </li>
                    <li class="">
                        <a href="#about2" data-toggle="tab">优化</a>
                    </li>
                    <li class="">
                        <a href="#profile2" data-toggle="tab">内容</a>
                    </li>
                    <!-- <li class="">
                        <a href="#contact2" data-toggle="tab">其他</a>
                    </li> -->
                </ul>
            </header>
            <form class="form-horizontal adminex-form" method="post" method="{{url('cate/edit')}}">
            {{ csrf_field() }}
                    <input type="hidden" name="id" value="{{ $res->cate_id }}">
            <div class="panel-body">
                    <div class="tab-content">
                        <div class="tab-pane active" id="home2">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">所属栏目</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-bot15" name="parent_id">
                                        <option value="0">一级栏目</option>
                                            @foreach($cate as $k)
                                             <option value="{{$k->cate_id}}"
                                                
                                            @if ($res->parent_id == $k->cate_id)
                                             selected
                                            @endif

                                             >{{ $k->name }}</option>
                                            @endforeach
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">栏目名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="name" value="{{ $res->name }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">路由地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="html" value="{{ $res->html }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label" name="model_id">栏目模型</label>
                                <div class="col-sm-10">
                                   <select class="form-control m-bot15" name="model_id">
                                        @foreach($list as $key)
                                         <option value="{{$key->model_id}}"
                                            @if ($res->model_id == $key->model_id)
                                             selected
                                            @endif
                                             >{{ $key->model_name }}</option>
                                        @endforeach
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">首页模板</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="listtpl" value="{{ $res->listtpl }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">阅读模板</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="readtpl" value="{{ $res->readtpl }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">频道排序</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="isorder" value="{{ $res->isorder }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页数</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="pagesize" value="{{ $res->pagesize }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">跳转地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="url" value="{{ $res->url }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">是否显示</label>
                                <div class="col-sm-10">
                                    <div class="icheck ">
                                        <div class="flat-grey">
                                            <div class="radio ">
                                                <input type="radio"  name="is_show" value="1"
                                                    @if ($res->is_show == 1)
                                                     checked=""
                                                    @endif
                                                >
                                                <label>关闭</label>
                                            </div>
                                        </div>
                                        <div class="flat-green">
                                            <div class="radio">
                                                <input type="radio"   name="is_show" value="2"  @if ($res->is_show == 2)
                                                     checked=""
                                                    @endif>
                                                <label>开启</label>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="about2">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面标题</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="title" value="{{ $res->title }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面关键词</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="keywords" value="{{ $res->keywords }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">页面描述</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="description" value="{{ $res->description }}">
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="profile2">
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">栏目图</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="picture" value="{{ $res->picture }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">简短内容</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="scontent" value="{{ $res->scontent }}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 col-sm-2 control-label">内容</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="content" value="{{ $res->content }}">
                                </div>
                            </div>
                        </div>
                        <!-- <div class="tab-pane" id="contact2">Contact</div> -->
                    </div>
                    <div class="panel-body">
                        <div class="col-lg-offset-2 col-lg-10">
                            <button type="submit" class="btn btn-success">提交</button>
                            <button type="reset" class="btn btn-default">重置</button>
                        </div>
                    </div>
            </div>
            </form>
        </section>
    </div>
</div>

@endsection